import React from 'react';
// 引入proptypes类型检查
import PropTypes from 'prop-types';

// 函数组件
const Cmp2fun = ({ a, b }) => {

  console.log(a + b);

  return (
    <div>

    </div>
  );
}

// 类型检查
Cmp2fun.propTypes = {
  a: PropTypes.number,
  b: PropTypes.number
}

// 默认值
Cmp2fun.defaultProps = {
  b: 1000
}

export default Cmp2fun;
